<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group" data-toggle="cxselect"  data-selects="row[order_id],row[trademark_printing],abbreviation,colour">-->
<!--        <div class="form-group">-->
<!--            <label class="control-label col-xs-12 col-sm-2">{:__('订单号')}:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--&lt;!&ndash;            <select class="orderid form-control" name="orderid" data-url="ajax/getorder?type=page&amp;pid=5">&ndash;&gt;-->
<!--                <select class="orderid form-control" name="row[order_id]" data-url="ajax/getorder">-->
<!--                    <option value="0" selected="">选择订单id</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="control-label col-xs-12 col-sm-2">{:__('商品印字')}:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <select class="trademark form-control" name="row[trademark_printing]" data-url="ajax/getorder" data-query-name="pid">-->
<!--                    <option value="0" selected="">选择商品印字</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="control-label col-xs-12 col-sm-2">{:__('Colour_id')}:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <input id="c-colour_id" min="0" data-rule="required" data-source="other/colour/index" class="form-control selectpage" name="row[colour_id]" type="text" value="">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="control-label col-xs-12 col-sm-2">{:__('Process_attribute_id')}:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <select class="abbreviation form-control" name="abbreviation" data-url="ajax/getorder" data-query-name="pid">-->
<!--                    <option value="0" selected="">移动端</option>-->
<!--                </select>-->
<!--            </div>-->
<!--    &lt;!&ndash;        <div class="col-xs-12 col-sm-8">&ndash;&gt;-->
<!--    &lt;!&ndash;            <input data-multiple="true"  id="c-process_attribute_id" min="0" data-rule="required" data-source="other/processattribute/index" class="form-control selectpage" name="row[process_attribute_id]" type="text" value="">&ndash;&gt;-->
<!--    &lt;!&ndash;        </div>&ndash;&gt;-->
<!--        </div>-->
<!--        <div class="form-group">-->
<!--            <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <input id="c-quantity" class="form-control" name="row[quantity]" type="number">-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="form-group" data-toggle="cxselect"  data-selects="orderid,trademark,abbreviation,colour">-->

        <!-- <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('订单号')}:</label>

                    <div class="col-xs-12 col-sm-8">
                        <input data-field="order_no" data-pagination="true"  data-page-size="10"  id="c-order_id" min="0" data-rule="required" data-source="statistics/order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
                    </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('商标印字')}:</label>

            <div class="col-xs-12 col-sm-8">
                <input   data-rule="required"  class="form-control" name="row[trademark_printing]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('色号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-colour_id" min="0" data-rule="required" data-source="other/colour/index" class="form-control selectpage" name="row[colour_id]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('收货人')}:</label>

                    <div class="col-xs-12 col-sm-8">
                        <input id="c-employee_id" min="0" data-rule="required" data-source="other/employee/index" class="form-control selectpage" name="row[employee_id]" type="text" value="">
                    </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('工序')}:</label>

                    <div class="col-xs-12 col-sm-8">
                        <input data-multiple="true"  id="c-process_attribute_id" min="0" data-rule="required" data-source="other/processattribute/index" class="form-control selectpage" name="row[process_attribute_id]" type="text" value="">
                    </div>
        </div>
        <div class="form-group">orderdetail
            <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-quantity" class="form-control" name="row[quantity]" type="number">
            </div>
        </div> -->

    <div class="form-group" data-toggle="cxselect" data-selects="order_no,trademark_printing,colour_id">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('订单号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select class="order_no form-control" name="row[order_id]"  data-url="ajax/getorder?type=order"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('商品印字')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select class="trademark_printing form-control" name="row[trademark_printing]"  data-url="ajax/getorder?type=trademark_printing" data-query-name="id"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('色号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select class="colour_id form-control" name="row[colour_id]" data-url="ajax/getorder?type=colour_id" data-query-name="id"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('工序')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select id="process" class="process form-control" name="row[process_attribute_id]"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('收货人')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-employee_id" min="0" data-rule="required" data-source="other/employee/index" class="form-control selectpage" name="row[employee_id]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-quantity" class="form-control" name="row[quantity]" type="number">
            </div>
        </div>  
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    document.getElementById("process").onclick=function(){
        $("#process").empty();
        var text1=$('.trademark_printing option:selected').text();
        var text2=$('.colour_id option:selected').text();
        var url="ajax/getorder?type=process&&text1="+text1+"&&text2="+text2;
        $.ajax({
            url: "ajax/getorder?type=process&&text1="+text1+"&&text2="+text2,
            contentType: false,
            processData: false,
            success: function (data) {
                for (i = 0; i < data.length; i++) {
                    $("#process").append( "<option value="+data[i][0].id+">"+data[i][0].name+"</option>" );
                }
            }
        });
    }
    document.getElementById("process").onchange=function(){
        $("#process").empty();
    }; 
</script>